package com.mida.bms.report.api;

import com.mida.bms.report.vo.*;
import com.mida.tool.common.result.ListResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.DependsOn;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@DependsOn("loadFromDatabasePropertyConfig")
@FeignClient(name = "docReportServiceApi", url = "bms.report.feign.url")
public interface DocReportServiceApi {

    /**
     * 4、获取报告状态,和报告soid
     * @param requestSoid 申请单soid
     * @return 报告的流转状态，自身状态，报告soid
     */
    @GetMapping(value = "/docReportList/selectStautusByRequestSoid" )
    @ResponseBody
    ListResult<DocReportRequisitionRelationVo> selectStautusByRequestSoid(@RequestParam("requestSoid") Long requestSoid);

    /**
     * 5、获取书写医生或审核医生标识
     * @param requestSoid 申请单soid
     * @return 书写医生/审核医生
     */
    @GetMapping(value = "/docReportList/selectDoctorByRequestSoid")
    @ResponseBody
    ListResult<DocReportRequisitionRelationVo> selectDoctorByRequestSoid(@RequestParam("requestSoid") Long requestSoid);

    /**
     * 5、分页查询待审核/已完成状态下报告list
     * @param vo reportProcessStatus -->16033111859003392 书写完成待审核  16033111879974912 审核完成
     * @return 申请单soid
     */
    @PostMapping(value = "/docReportList/findReportPage", consumes = MediaType.APPLICATION_JSON_VALUE)
    ListResult<PageResultVo<DocReportListVo>> findReportPage(@RequestBody DocReportListPageVo vo);

    /**
     * 6、获取书写医生或审核医生标识、获取报告状态,和报告soid
     *
     * @param reportSearchRequest 申请单soid
     * @return 书写医生/审核医生/报告状态,和报告soid
     */
    @PostMapping(value = "/docReportList/selectDoctorAndStatus",consumes = MediaType.APPLICATION_JSON_VALUE)
    ListResult<DocReportRequisitionRelationVo> selectDoctorAndStatus(@RequestBody ReportSearchRequest reportSearchRequest);

    /**
     * 6、获取书写医生或审核医生标识、获取报告状态,和报告soid
     *
     * @param reportSearchVo 申请单soid
     * @return 书写医生/审核医生/报告状态,和报告soid
     */
    @PostMapping(value = "/docReportList/selectDoctorAndStatusList")
    ListResult<List<DocReportRequisitionRelationVo>> selectDoctorAndStatusList(@RequestBody ReportSearchVo reportSearchVo);
}
